<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: mi
  Date: 2019/5/24
  Time: 15:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/mater.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/vendor.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/styles.css">
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.png">
    <script src="${pageContext.request.contextPath}/js/jquery2.js"></script>
</head>
<body>
<div class="card-body">
    <form method="post" action="stratMoveDept">
        <input type="text" value="${dept.id}" hidden name="id">
        <div class="form-group">
            <label for="dbian">部门编号</label>
            <input type="text" value="${dept.dbian}" class="form-control" name="dbian" id="dbian">
        </div>
        <div class="form-group">
            <label for="dname">部门名称</label>
            <input type="text" value="${dept.dname}" class="form-control" id="dname" name="dname">
        </div>
        <div class="form-group">
            <label for="pid">上级部门</label>
            <select class="form-control" id="pid" name="pid">
                <c:forEach items="${positions}" var="p">
                    <option value="${p.id}" ${p.id==dept.pid?"selected":""}>${p.wname}</option>
                </c:forEach>
            </select>
        </div>
        <div class="form-group">
            <label>部门负责人</label>
            <input type="text" value="${dept.dmanager}" class="form-control" name="dmanager" id="dmangager">
        </div>
        <div class="form-group">
            <label for="dtel">部门电话</label>
            <input type="text" value="${dept.dtel}" class="form-control" id="dtel" name="dtel">
        </div>
        <div class="form-group">
            <label for="dfax">部门传真</label>
            <textarea class="form-control" id="dfax" name="dfax" rows="4">${dept.dfax}</textarea>
        </div>
        <div class="form-group">
            <label for="demail">部门邮箱</label>
            <input type="email" class="form-control" value="${dept.demail}" id="demail" name="demail"/>
        </div>
        <div class="form-group">
            <label for="duty">部门职责</label>
            <input class="form-control" value="${dept.duty}" id="duty" name="duty"/>
        </div>
        <button type="submit" class="btn btn-gradient-primary mr-2">确认修改</button>
    </form>
</div>
<script>
    $(function () {
        $("#dbian").prop("disabled", "disabled");
        $("#dname").prop("disabled", "disabled");
        $("#dmangager").prop("disabled", "disabled");
        $("#dtel").prop("disabled", "disabled");
        $("#dfax").prop("disabled", "disabled");
        $("#demail").prop("disabled", "disabled");
        $("#duty").prop("disabled", "disabled");
    });
</script>
</body>
</html>